import { ref } from 'vue'
import { defineStore } from 'pinia'
import { useRandom } from '@/composables/useRandom'
import { getGamePoint } from '@/utils/game'

const useGameStore = defineStore('game', () => {
  const pointer = ref<number>(getGamePoint())
  const running = ref(false)
  const history = useRandom(10000, 999999)
  const multiple = useRandom(1, 99)
  return { 
    history,
    multiple,
    pointer,
    running
  }
})

export default useGameStore